package com.niodata.dp.monitor.sharelib.entity.hadoop;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by ndp on 17-12-19.
 */
public class YarnSummary implements Serializable {

  private int id;
  private String status;
  private String manager;
  private int managerId;
  private Date createTime;
  //"name": "Hadoop:service=ResourceManager,name=ClusterMetrics"
  //NM存活节点数量监控
  private int numActiveNMs;
  //NM丢失节点数量监控
  private int numLostNMs;
  //NM不健康节点数量监控
  private int numUnhealthyNMs;
  //"Hadoop:service=ResourceManager,name=QueueMetrics,q0=root"
  //app提交数量
  private int appsSubmitted;
  //app的运行数量
  private int appsRunning;
  //app等待数量
  private int appsPending;
  //app完成数量
  private int appsCompleted;
  //app被kill的数量
  private int appsKilled;
  //app失败数量
  private int appsFailed;
  //已分配的内存大小
  private double allocatedMem;
  //已分配的核数量
  private int allocatedVCores;
  //已分配的Container数量
  private int allocatedContainers;
  //可用的内存大小
  private double availableMem;
  //可用的核数量
  private int availableVCores;
  //等待分配的内存大小
  private double pendingMem;
  //等待分配的核数量
  private int pendingVCores;
  //等待分配的Container数量
  private int pendingContainers;
  //预留的内存大小
  private double reservedMem;
  //预留的核数量
  private int reservedVCores;
  //预留的Container数量
  private int reservedContainers;
  //"name": "Hadoop:service=ResourceManager,name=RpcDetailedActivityForPort8032"
  //每秒提交app的数量
  private int submitApplicationNumOps;
  //提交一个app所用的平均时间
  private double submitApplicationAvgTime;
  //每秒获取app状态的数量
  private int getApplicationReportNumOps;
  //获取一个app状态所用的平均时间
  private double getApplicationReportAvgTime;

  public String getStatus() {
    return status;
  }

  public void setStatus(String status) {
    this.status = status;
  }

  public String getManager() {
    return manager;
  }

  public void setManager(String manager) {
    this.manager = manager;
  }

  public int getManagerId() {
    return managerId;
  }

  public void setManagerId(int managerId) {
    this.managerId = managerId;
  }

  public int getNumActiveNMs() {
    return numActiveNMs;
  }

  public void setNumActiveNMs(int numActiveNMs) {
    this.numActiveNMs = numActiveNMs;
  }

  public int getNumLostNMs() {
    return numLostNMs;
  }

  public void setNumLostNMs(int numLostNMs) {
    this.numLostNMs = numLostNMs;
  }

  public int getNumUnhealthyNMs() {
    return numUnhealthyNMs;
  }

  public void setNumUnhealthyNMs(int numUnhealthyNMs) {
    this.numUnhealthyNMs = numUnhealthyNMs;
  }

  public int getAppsSubmitted() {
    return appsSubmitted;
  }

  public void setAppsSubmitted(int appsSubmitted) {
    this.appsSubmitted = appsSubmitted;
  }

  public int getAppsRunning() {
    return appsRunning;
  }

  public void setAppsRunning(int appsRunning) {
    this.appsRunning = appsRunning;
  }

  public int getAppsPending() {
    return appsPending;
  }

  public void setAppsPending(int appsPending) {
    this.appsPending = appsPending;
  }

  public int getAppsCompleted() {
    return appsCompleted;
  }

  public void setAppsCompleted(int appsCompleted) {
    this.appsCompleted = appsCompleted;
  }

  public int getAppsKilled() {
    return appsKilled;
  }

  public void setAppsKilled(int appsKilled) {
    this.appsKilled = appsKilled;
  }

  public int getAppsFailed() {
    return appsFailed;
  }

  public void setAppsFailed(int appsFailed) {
    this.appsFailed = appsFailed;
  }

  public double getAllocatedMem() {
    return allocatedMem;
  }

  public void setAllocatedMem(double allocatedMem) {
    this.allocatedMem = allocatedMem;
  }

  public int getAllocatedVCores() {
    return allocatedVCores;
  }

  public void setAllocatedVCores(int allocatedVCores) {
    this.allocatedVCores = allocatedVCores;
  }

  public int getAllocatedContainers() {
    return allocatedContainers;
  }

  public void setAllocatedContainers(int allocatedContainers) {
    this.allocatedContainers = allocatedContainers;
  }

  public double getAvailableMem() {
    return availableMem;
  }

  public void setAvailableMem(double availableMem) {
    this.availableMem = availableMem;
  }

  public int getAvailableVCores() {
    return availableVCores;
  }

  public void setAvailableVCores(int availableVCores) {
    this.availableVCores = availableVCores;
  }

  public double getPendingMem() {
    return pendingMem;
  }

  public void setPendingMem(double pendingMem) {
    this.pendingMem = pendingMem;
  }

  public int getPendingVCores() {
    return pendingVCores;
  }

  public void setPendingVCores(int pendingVCores) {
    this.pendingVCores = pendingVCores;
  }

  public int getPendingContainers() {
    return pendingContainers;
  }

  public void setPendingContainers(int pendingContainers) {
    this.pendingContainers = pendingContainers;
  }

  public double getReservedMem() {
    return reservedMem;
  }

  public void setReservedMem(double reservedMem) {
    this.reservedMem = reservedMem;
  }

  public int getReservedVCores() {
    return reservedVCores;
  }

  public void setReservedVCores(int reservedVCores) {
    this.reservedVCores = reservedVCores;
  }

  public int getReservedContainers() {
    return reservedContainers;
  }

  public void setReservedContainers(int reservedContainers) {
    this.reservedContainers = reservedContainers;
  }

  public int getSubmitApplicationNumOps() {
    return submitApplicationNumOps;
  }

  public void setSubmitApplicationNumOps(int submitApplicationNumOps) {
    this.submitApplicationNumOps = submitApplicationNumOps;
  }

  public double getSubmitApplicationAvgTime() {
    return submitApplicationAvgTime;
  }

  public void setSubmitApplicationAvgTime(double submitApplicationAvgTime) {
    this.submitApplicationAvgTime = submitApplicationAvgTime;
  }

  public int getGetApplicationReportNumOps() {
    return getApplicationReportNumOps;
  }

  public void setGetApplicationReportNumOps(int getApplicationReportNumOps) {
    this.getApplicationReportNumOps = getApplicationReportNumOps;
  }

  public double getGetApplicationReportAvgTime() {
    return getApplicationReportAvgTime;
  }

  public void setGetApplicationReportAvgTime(double getApplicationReportAvgTime) {
    this.getApplicationReportAvgTime = getApplicationReportAvgTime;
  }

  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public Date getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }
}
